import Vue            from 'vue'
import Router         from 'vue-router'
import NavTabBar      from '@/components/web/nav/index'
import Home           from '@/components/web/home/index'
import ShopCart       from '@/components/web/shopCart/index'
import Navtab         from '@/components/web/navtab/index'
import Personal       from '@/components/web/personal/index'
import Search         from '@/components/web/search/index'
import SearchResult   from '@/components/web/search/SearchResult'
import Product        from '@/components/web/product/index'
import OrderList      from '@/components/web/orderList/index'
import UserAddress    from '@/components/web/userAddress/index'
import UserSet        from '@/components/web/userSet/index'
import LoginRegister  from '@/components/web/login/index'
import Login          from '@/components/web/login/login'
import PhoneLogin     from '@/components/web/login/phoneLogin'
import ResetPassword  from '@/components/web/login/resetPassword'
import Register       from '@/components/web/login/register'
import FirmOrder      from '@/components/web/orderList/firmOrder'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: NavTabBar,
      children:[
        {
          path:"",
          name:'home',
          component:Home
        },
        {
          path:"navtab",
          name:'navtab',
          component:Navtab
        },
        {
          path:"shopcart",
          name:'shopCart',
          component:ShopCart
        },
        {
          path:"personal",
          name:"personal",
          component:Personal
        }
      ]
    },
    {
      path:"/search",
      name:"search",
      component:Search
    },
    {
      path:"/searchResult",
      name:"searchResult",
      component:SearchResult
    },
    {
      path:"/product",
      name:"product",
      component:Product
    },
    {
      path:"/orderList",
      name:"orderList",
      component:OrderList
    },
    {
      path:"/userAddress",
      name:"userAddress",
      component:UserAddress
    },
    {
      path:"/userSet",
      name:"userSet",
      component:UserSet
    },
    {
      path:"/loginRegister",
      name:"loginRegister",
      component:LoginRegister
    },
    {
      path:"/login",
      name:"login",
      component:Login
    },
    {
      path:"/phoneLogin",
      name:"phoneLogin",
      component:PhoneLogin
    },
    {
      path:"/resetPassword",
      name:"resetPassword",
      component:ResetPassword
    },
    {
      path:"/register",
      name:"register",
      component:Register
    },
    {
      path:"/firmOrder",
      name:"firmOrder",
      component:FirmOrder
    }
  ]
})
